package com.chii.drink;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import java.util.List;

public class MFragmentAdapter extends FragmentStatePagerAdapter {
    Context context;
    List<Fragment> listFragment;
    public MFragmentAdapter(FragmentManager fm,Context context,List<Fragment> listFragment) {
        super(fm);
        this.context =context;
        this.listFragment=listFragment;
    }

    @Override
    public Fragment getItem(int i) {
        return listFragment.get(i);
    }

    @Override
    public int getCount() {
        return listFragment.size();
    }
}
